-
Notifications
You must be signed in to change notification settings - Fork 225
8282144: RandomSupport.convertSeedBytesToLongs sign extension overwrites previous bytes #3698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8282144: RandomSupport.convertSeedBytesToLongs sign extension overwrites previous bytes #3698
Conversation
👋 Welcome back dtmhuang! A progress list of the required criteria for merging this PR into |
@dtmhuang This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 12 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. ➡️ To flag this PR as ready for integration with the above commit message, type |
This backport pull request has now been updated with issue from the original commit. |
|
/approval request Motivation: Without this change, Risk: Low. Ran GHA Sanity Checks, and tier 1 and tier 2 tests locally, as well as the testcase written specifically for this issue ( |
/integrate |
/sponsor |
Going to push as commit 8b306de.
Your commit was automatically rebased without conflicts. |
@phohensee @dtmhuang Pushed as commit 8b306de. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Backport for RandomSupport issue. There is a loss of information when using
convertSeedBytesToLongs()
with a bad seed, causing a lot of the original bytes to be overwritten by 1s. The fix involves using a bitwise AND with the seed before distributing the seed bytes into the result.Note there is an exact same issue/bugfix with
convertSeedBytesToInts()
, but I will backport that bugfix separatelyClean backport, ran GHA sanity checks and locally tested tier1, tier2. In tier2, there were 2 failures:
test/jdk/java/nio/channels/DatagramChannel/SendReceiveMaxSize.java
test/jdk/java/nio/channels/FileChannel/directio/DirectIOTest.java
However, these both failed before the backport as well.
The backport also includes the test for this issue
T8282144.java
, which passes.Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3698/head:pull/3698
$ git checkout pull/3698
Update a local copy of the PR:
$ git checkout pull/3698
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3698/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3698
View PR using the GUI difftool:
$ git pr show -t 3698
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3698.diff
Using Webrev
Link to Webrev Comment